This invention relates generally to the field of computer video display systems. More particularly, this invention relates to a computer video graphics system having state tables and to a method for controlling data flow relative to the state tables.
In computer video graphics systems, a monitor displays frames of information provided by a frame buffer many times a second. The subsystem of a video graphics system between the frame buffer and the monitor is called the video data path. Typically, a video data path comprises a system of logic and memory elements, such as color lookup tables and other state tables, which perform a variety of functions. As the format and content of video data becomes increasingly complex, the capability of video displays increases. For example, providing the feature of so-called windows in graphics systems increases the demand on and complexity of the video data path. To define window boundaries and other window attributes or characteristics, large volumes of digital data in the form of state information are called for. State information is also called for to define cursor characteristics. Such data must be loaded into state tables in the video data path. If the state information changes during a refresh of the monitor screen, the monitor screen will show a glitch because the data displayed represents a combination of both current and superceded or invalid states.
In known video graphics systems, a general purpose microprocessor interface has been used to load the state tables. The computer CPU synchronized itself to vertical retrace and completed the updating of the state tables before retrace was finished. This worked satisfactorily for relatively small state tables because the entire loading of the state tables could be completed during the retrace period, typically on the order of a few microseconds. But, updating of larger state tables would cause screen glitches or anomalies, because there is a sharp limit to the number of microprocessor write cycles that can occur during vertical retrace. For example, in a system having a 256 entry colormap, glitches may occur if the entire color map is changed during a retrace period.
Other known systems have incorporated higher speed data path loading from a so-called shadow copy of the state tables in an off-screen bitmap memory. Such systems solved part of the problem because the frame buffer bus had enough bandwidth to load more state data in larger state tables than previous systems during vertical retrace. However, the CPU still synchronized itself to vertical retrace when modifying the shadow copy of the state tables in the frame buffer. Also, once the CPU began to load the shadow copy of the state tables, it completed the loading without pause. This is practical with small colormaps such as, for example, sixteen entry colormaps, but is impractical when the state tables become large since they cannot be loaded during one vertical retrace.
It would be desirable to have a computer video graphics system which ensured that no data is loaded into the shadow copy of the state tables while they are being accessed. It also would be desirable to have a computer graphics system which allows pauses during the write cycle of the shadow copy of the state tables. If the state data need to be stored in more pixels than are displayed in one scanline on the screen, then a sustained transfer may not be possible. It would be advantageous to allow the load process to be paused during horizontal retrace, thus allowing the same timing to be used for data loading as for screen display.
It is known to use so-called semaphores in computer systems. Semaphores are arbitration devices used to coordinate the activities of two or more programs or processes that are running at the same time and sharing information. They are known to be used for elementary interprocess communication, to guarantee access to shared data, to protect a section of code that must be executed without certain kinds of interruptions (such a code segment is called a critical region or critical section), or to allocate a set of identical scarce resources. For a further explanation of semaphores, see Encyclopedia of Computer Science and Engineering, Second Edition, Anthony Ralston (editor), Van Nostrand Reinhold Company, New York (1983) at page 1311 for an article by M. Shaw entitled "Semaphore," which is hereby incorporated by reference.
It would be advantageous for a computer video graphics system to employ semaphores for controlling the read or write cycles to the shadow copy of the state tables to ensure the integrity of the data provided to the monitor.